<?php
session_start();
class GetUserStatus extends Controller
{

	public function __construct()
	{
		parent::__construct();		
	}
	
	public function run()
	{
		$str  = $this->setUserStatus();
		echo $str;
	}
	
	public function setUserStatus()
	{
		if (FE_USER_LOGGED_IN){
			$this->import('FrontendUser', 'User');
			$this->loadDataContainer('tl_member');
			
			$navigation = '
<a href="order-status.html?mem_id=' . $this->User->id . '" title="ORDER STATUS">ORDER STATUS</a> 
<a href="profile_detail.html?id_member=' . $this->User->id . '" title="PROFILE">PROFILE</a> 
<a href="backpocket.html" title="WISHLIST">WISHLIST</a> 
<a href="shipping_payment.html" title="ADDRESS BOOK">ADDRESS BOOK</a>
<a href="logout.html" title="Sign Out" class="sign">Sign Out</a>
';
			
			$strHTML = $navigation.'<a href="profile.html" title="USER PROFILE" class="sign"><strong><u>My Account</u></strong></a>&nbsp;&nbsp;&nbsp;&nbsp; ::';
		}else{
			$strHTML = '<a href="sign-in.html" title="Sign in or Create account" class="sign">Sign in <i>or</i> Create account</a>';
		}
		
		return $strHTML;
	}
	
}

$objGetRd = new GetUserStatus();
$objGetRd->run();

?>